inherited fmContriolLesson: TfmContriolLesson
  Left = 251
  Top = 108
  Width = 1450
  Height = 647
  Caption = #1054#1087#1083#1072#1090#1072' '#1076#1086#1087'. '#1091#1089#1083#1091#1075
  Constraints.MinHeight = 647
  Constraints.MinWidth = 1098
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 582
    Width = 1434
  end
  inherited Panel1: TPanel
    Width = 1434
    Visible = False
    inherited BitBtn1: TBitBtn
      Left = 1266
      ModalResult = 0
      Kind = bkCustom
    end
    inherited BitBtn2: TBitBtn
      Left = 1354
      ModalResult = 0
      Kind = bkCustom
    end
  end
  object cxSplitter1: TcxSplitter [2]
    Left = 0
    Top = 45
    Width = 8
    Height = 537
  end
  object Panel2: TPanel [3]
    Left = 8
    Top = 45
    Width = 1426
    Height = 537
    Align = alClient
    TabOrder = 3
    DesignSize = (
      1426
      537)
    object cxSplitter2: TcxSplitter
      Left = 721
      Top = 1
      Width = 8
      Height = 535
      HotZoneClassName = 'TcxMediaPlayer9Style'
      Control = Panel3
    end
    object Panel3: TPanel
      Left = 1
      Top = 1
      Width = 720
      Height = 535
      Align = alLeft
      Caption = 'Panel3'
      Constraints.MinWidth = 720
      TabOrder = 1
      object ToolBar2: TToolBar
        Left = 1
        Top = 1
        Width = 718
        Height = 58
        AutoSize = True
        BorderWidth = 2
        ButtonHeight = 24
        EdgeInner = esNone
        EdgeOuter = esNone
        Images = DMInv.ilActive
        TabOrder = 0
        TabStop = True
        Transparent = True
        object tbShowTabels: TToolButton
          Left = 0
          Top = 2
          Hint = #1058#1072#1073#1077#1083#1080
          Caption = 'tbShowTabels'
          ImageIndex = 7
          ParentShowHint = False
          ShowHint = True
          OnClick = tbShowTabelsClick
        end
        object tbAddVosp: TToolButton
          Left = 23
          Top = 2
          Hint = #1069#1082#1089#1087#1086#1088#1090
          ImageIndex = 16
          ParentShowHint = False
          ShowHint = True
          OnClick = tbAddVospClick
        end
        object tbrefresh: TToolButton
          Left = 46
          Top = 2
          Hint = #1054#1073#1085#1086#1074#1080#1090#1100
          Caption = 'tbrefresh'
          ImageIndex = 8
          ParentShowHint = False
          Wrap = True
          ShowHint = True
          OnClick = tbrefreshClick
        end
        object rboall: TcxRadioButton
          Left = 0
          Top = 26
          Width = 48
          Height = 24
          Caption = #1042#1089#1077
          TabOrder = 1
          OnClick = rbneoplachClick
        end
        object rbneoplach: TcxRadioButton
          Left = 48
          Top = 26
          Width = 140
          Height = 24
          Caption = #1053#1072#1095#1080#1089#1083#1077#1085#1086', '#1085#1086' '#1085#1077' '#1086#1087#1083'.'
          TabOrder = 0
          OnClick = rbneoplachClick
        end
        object rbest: TRadioButton
          Left = 188
          Top = 26
          Width = 200
          Height = 24
          Caption = #1055#1077#1076#1072#1075#1086#1075#1080' '#1089' '#1085#1077' '#1086#1090#1084#1077#1095'. '#1079#1072#1085#1103#1090#1080#1103#1084#1080
          Checked = True
          TabOrder = 2
          TabStop = True
          OnClick = rbneoplachClick
        end
        object cxLabel1: TcxLabel
          Left = 388
          Top = 29
          Caption = #1055#1077#1088#1080#1086#1076' '#1076#1083#1103' '#1072#1085#1072#1083#1080#1090#1080#1082#1080
        end
        object eDate: TcxButtonEdit
          Tag = 11
          Left = 509
          Top = 26
          ParentFont = False
          Properties.Buttons = <
            item
              Glyph.Data = {
                F6000000424DF600000000000000760000002800000010000000100000000100
                0400000000008000000000000000000000001000000000000000000000000000
                8000008000000080800080000000800080008080000080808000C0C0C0000000
                FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFF0FFFFFFFFFFFFFF000FFFFFFFFFFFF00000FFFFFFFFFF0000000F
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
            end>
          Properties.MaxLength = 0
          Properties.ReadOnly = True
          Properties.OnButtonClick = eDatePropertiesButtonClick
          Properties.OnChange = eDatePropertiesChange
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clWindowText
          Style.Font.Height = -13
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = [fsBold]
          Style.LookAndFeel.SkinName = ''
          Style.Shadow = False
          Style.IsFontAssigned = True
          StyleDisabled.LookAndFeel.SkinName = ''
          StyleFocused.LookAndFeel.SkinName = ''
          StyleHot.LookAndFeel.SkinName = ''
          TabOrder = 3
          Width = 196
        end
      end
      object dbgPedag: TcxGrid
        Left = 1
        Top = 59
        Width = 718
        Height = 475
        Align = alClient
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
        TabOrder = 1
        LookAndFeel.Kind = lfStandard
        object tvPedag: TcxGridDBTableView
          NavigatorButtons.ConfirmDelete = False
          NavigatorButtons.PriorPage.Visible = True
          NavigatorButtons.Next.Visible = True
          NavigatorButtons.Insert.Visible = True
          NavigatorButtons.Append.Visible = False
          NavigatorButtons.Edit.Visible = False
          NavigatorButtons.Post.Visible = True
          NavigatorButtons.Cancel.Visible = False
          NavigatorButtons.Refresh.Visible = False
          NavigatorButtons.SaveBookmark.Visible = False
          NavigatorButtons.GotoBookmark.Visible = False
          NavigatorButtons.Filter.Visible = False
          DataController.DataSource = dlgDS
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <
            item
              Format = '0'
              Kind = skCount
              FieldName = 'PP'
              Column = tvPedagPP
            end
            item
              Format = '#,###0'
              Kind = skSum
              FieldName = 'AMOUNT_UJE_VYPLATILI'
              Column = tvPedagAMOUNT_UJE_VYPLATILI
            end
            item
              Format = '#,###0'
              Kind = skSum
              FieldName = 'AMOUNT_VYPLATIT'
              Column = tvPedagAMOUNT_VYPLATIT
            end
            item
              Format = '#,###0'
              Kind = skSum
              FieldName = 'VYPLATIT_PERIOD'
              Column = tvPedagVYPLATIT_PERIOD
            end
            item
              Format = '#,###0'
              Kind = skSum
              FieldName = 'UJE_VYPL_PERIOD'
              Column = tvPedagUJE_VYPL_PERIOD
            end>
          DataController.Summary.SummaryGroups = <>
          OptionsBehavior.CellHints = True
          OptionsCustomize.ColumnFiltering = False
          OptionsData.CancelOnExit = False
          OptionsData.Deleting = False
          OptionsData.DeletingConfirmation = False
          OptionsData.Inserting = False
          OptionsView.CellEndEllipsis = True
          OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
          OptionsView.CellAutoHeight = True
          OptionsView.CellTextMaxLineCount = 1
          OptionsView.ColumnAutoWidth = True
          OptionsView.Footer = True
          OptionsView.GroupByBox = False
          OptionsView.HeaderEndEllipsis = True
          OptionsView.Indicator = True
          Preview.Visible = True
          Styles.Header = DMInv.cxSiniyText
          object tvPedagPP: TcxGridDBColumn
            Caption = #1055#1088#1077#1087#1086#1076#1072#1074#1072#1090#1077#1083#1100
            DataBinding.FieldName = 'PP'
            Options.Editing = False
            Width = 117
          end
          object tvPedagAMOUNT_VYPLATIT: TcxGridDBColumn
            Caption = #1050' '#1086#1087#1083#1072#1090#1077
            DataBinding.FieldName = 'AMOUNT_VYPLATIT'
            Options.Editing = False
            Width = 83
          end
          object tvPedagKOPLATE: TcxGridDBColumn
            Caption = #1050' '#1086#1087#1083#1072#1090#1077' '#1096#1090
            DataBinding.FieldName = 'KOPLATE'
            Options.Editing = False
            Width = 76
          end
          object tvPedagAMOUNT_UJE_VYPLATILI: TcxGridDBColumn
            Caption = #1059#1078#1077' '#1074#1099#1087#1083#1072#1090#1080#1083#1080
            DataBinding.FieldName = 'AMOUNT_UJE_VYPLATILI'
            Options.Editing = False
            Width = 82
          end
          object tvPedagOPLACHENO_: TcxGridDBColumn
            Caption = #1059#1078#1077' '#1086#1087#1083'. '#1096#1090'.'
            DataBinding.FieldName = 'OPLACHENO_'
            Options.Editing = False
            Width = 78
          end
          object tvPedagVYPLATIT_PERIOD: TcxGridDBColumn
            Caption = #1050' '#1086#1087#1083'. '#1079#1072' '#1087#1077#1088#1080#1086#1076
            DataBinding.FieldName = 'VYPLATIT_PERIOD'
            Options.Editing = False
            Width = 128
          end
          object tvPedagUJE_VYPL_PERIOD: TcxGridDBColumn
            Caption = #1059#1078#1077' '#1086#1087#1083'. '#1079#1072' '#1087#1077#1088#1080#1086#1076
            DataBinding.FieldName = 'UJE_VYPL_PERIOD'
            Options.Editing = False
            Width = 106
          end
          object tvPedagOPLACHENO: TcxGridDBColumn
            Caption = #1054#1087#1083#1072#1095#1077#1085#1086'?'
            DataBinding.FieldName = 'OPLACHENO'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Properties.NullStyle = nssUnchecked
            Properties.ValueChecked = 1
            Properties.ValueUnchecked = 0
            Visible = False
            Width = 73
          end
        end
        object cxGridLevel2: TcxGridLevel
          GridView = tvPedag
        end
      end
    end
    object Panel4: TPanel
      Left = 729
      Top = 1
      Width = 696
      Height = 535
      Align = alClient
      Caption = 'Panel4'
      TabOrder = 2
      object dbgLesson: TcxGrid
        Left = 1
        Top = 73
        Width = 694
        Height = 244
        Align = alClient
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
        ParentFont = False
        TabOrder = 0
        LookAndFeel.Kind = lfStandard
        object tvLesson: TcxGridDBTableView
          NavigatorButtons.ConfirmDelete = False
          NavigatorButtons.PriorPage.Visible = True
          NavigatorButtons.Next.Visible = True
          NavigatorButtons.Insert.Visible = True
          NavigatorButtons.Append.Visible = False
          NavigatorButtons.Edit.Visible = False
          NavigatorButtons.Post.Visible = True
          NavigatorButtons.Cancel.Visible = False
          NavigatorButtons.Refresh.Visible = False
          NavigatorButtons.SaveBookmark.Visible = False
          NavigatorButtons.GotoBookmark.Visible = False
          NavigatorButtons.Filter.Visible = False
          OnCustomDrawCell = tvLessonCustomDrawCell
          DataController.DataSource = dsLesson
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <
            item
              Kind = skCount
              FieldName = 'PP'
              Column = tvLessonPP
            end
            item
              Format = '#,###0'
              Kind = skSum
              FieldName = 'RSOPLATIT'
              Column = tvLessonRSOPLATIT
            end>
          DataController.Summary.SummaryGroups = <>
          OptionsBehavior.CellHints = True
          OptionsCustomize.ColumnFiltering = False
          OptionsData.CancelOnExit = False
          OptionsData.Deleting = False
          OptionsData.DeletingConfirmation = False
          OptionsData.Inserting = False
          OptionsView.CellEndEllipsis = True
          OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
          OptionsView.CellAutoHeight = True
          OptionsView.CellTextMaxLineCount = 1
          OptionsView.ColumnAutoWidth = True
          OptionsView.Footer = True
          OptionsView.HeaderEndEllipsis = True
          OptionsView.Indicator = True
          Preview.Visible = True
          Styles.OnGetContentStyle = tvLessonStylesGetContentStyle
          Styles.Header = DMInv.cxSiniyText
          object tvLessonPP: TcxGridDBColumn
            Caption = #1055#1086#1083#1091#1095'. '#1091#1089#1083#1091#1075
            DataBinding.FieldName = 'PP'
            Options.Editing = False
            Width = 110
          end
          object tvLessonSDNAME: TcxGridDBColumn
            Caption = #1047#1072#1085#1103#1090#1080#1077
            DataBinding.FieldName = 'SDNAME'
            Options.Editing = False
            Width = 96
          end
          object tvLessonRSDATE: TcxGridDBColumn
            Caption = #1044#1072#1090#1072' '#1087#1088#1086#1074#1077#1076#1077#1085#1080#1103
            DataBinding.FieldName = 'RSDATE'
            Options.Editing = False
            Width = 68
          end
          object tvLessonRSOPLATIT: TcxGridDBColumn
            Caption = #1054#1087#1083#1072#1090#1080#1090#1100'?'
            DataBinding.FieldName = 'RSOPLATIT'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Properties.NullStyle = nssUnchecked
            Properties.ReadOnly = True
            Properties.ValueChecked = 1
            Properties.ValueUnchecked = 0
            Properties.OnEditValueChanged = tvLessonRSOPLATITPropertiesEditValueChanged
            Options.Editing = False
            Width = 38
          end
          object tvLessonRSOPLACHENO: TcxGridDBColumn
            DataBinding.FieldName = 'RSOPLACHENO'
            Visible = False
            Width = 74
          end
          object tvLessonRSPTIMEENTER: TcxGridDBColumn
            Caption = #1044#1072#1090#1072' '#1074#1074#1086#1076#1072
            DataBinding.FieldName = 'RSPTIMEENTER'
            Options.Editing = False
            Width = 52
          end
          object tvLessonRSTIMEBEGIN: TcxGridDBColumn
            Caption = #1042#1088#1077#1084#1103' '#1085#1072#1095'.'
            DataBinding.FieldName = 'RSTIMEBEGIN'
            PropertiesClassName = 'TcxTimeEditProperties'
            Properties.TimeFormat = tfHourMin
            Options.Editing = False
            Width = 49
          end
          object tvLessonRSTIMEEND: TcxGridDBColumn
            Caption = #1042#1088#1077#1084#1103' '#1086#1082#1086#1085#1095'.'
            DataBinding.FieldName = 'RSTIMEEND'
            PropertiesClassName = 'TcxTimeEditProperties'
            Properties.TimeFormat = tfHourMin
            Options.Editing = False
            Width = 56
          end
          object tvLessonOSN_PODR: TcxGridDBColumn
            Caption = #1054#1089#1085'. '#1087#1086#1076#1088'. '#1085#1072' '#1076#1077#1085#1100' '#1079#1072#1085#1103#1090#1080#1103
            DataBinding.FieldName = 'OSN_PODR'
            Options.Editing = False
            Width = 68
          end
          object tvLessonIS_TIME_CONFLICT: TcxGridDBColumn
            DataBinding.FieldName = 'IS_TIME_CONFLICT'
            Visible = False
            VisibleForCustomization = False
            Width = 74
          end
          object tvLessonIS_EXIST_TIME_CONFLICT: TcxGridDBColumn
            DataBinding.FieldName = 'IS_EXIST_TIME_CONFLICT'
            Visible = False
            VisibleForCustomization = False
            Width = 74
          end
          object tvLessonCONFLICT_TEXT: TcxGridDBColumn
            DataBinding.FieldName = 'CONFLICT_TEXT'
            Visible = False
            VisibleForCustomization = False
            Width = 14340
          end
          object tvLessonCONFLICT_NOTE: TcxGridDBColumn
            DataBinding.FieldName = 'CONFLICT_NOTE'
            Visible = False
            VisibleForCustomization = False
            Width = 14340
          end
          object tvLesson_CHIEF_NOTE: TcxGridDBColumn
            Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081' '#1088#1091#1082#1086#1074#1086#1076#1080#1090#1077#1083#1103
            DataBinding.FieldName = 'CHIEF_NOTE'
            PropertiesClassName = 'TcxMemoProperties'
            Properties.ScrollBars = ssVertical
            Properties.OnEditValueChanged = tvLesson_CHIEF_NOTEPropertiesEditValueChanged
            Options.Editing = False
            Width = 77
          end
          object tvLesson_TTARIF: TcxGridDBColumn
            Caption = #1058#1072#1088#1080#1092
            DataBinding.FieldName = 'TTARIF'
            Width = 56
          end
        end
        object cxGridLevel1: TcxGridLevel
          GridView = tvLesson
        end
      end
      object Panel5: TPanel
        Left = 1
        Top = 325
        Width = 694
        Height = 209
        Align = alBottom
        Caption = 'Panel5'
        TabOrder = 1
        object mRSNABLJUD: TcxDBMemo
          Left = 1
          Top = 1
          Align = alLeft
          DataBinding.DataField = 'RSNABLJUD'
          DataBinding.DataSource = dsLesson
          ParentFont = False
          Properties.ReadOnly = True
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clWindowText
          Style.Font.Height = -16
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = []
          Style.IsFontAssigned = True
          TabOrder = 0
          Height = 207
          Width = 184
        end
        object mRSTEMA: TcxDBMemo
          Left = 193
          Top = 1
          Align = alClient
          DataBinding.DataField = 'RSTEMA'
          DataBinding.DataSource = dsLesson
          ParentFont = False
          Properties.ReadOnly = True
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clWindowText
          Style.Font.Height = -16
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = []
          Style.IsFontAssigned = True
          TabOrder = 1
          Height = 207
          Width = 242
        end
        object cxSplitter4: TcxSplitter
          Left = 185
          Top = 1
          Width = 8
          Height = 207
          HotZoneClassName = 'TcxMediaPlayer9Style'
          Control = mRSNABLJUD
        end
        object pnConflict: TPanel
          Left = 443
          Top = 1
          Width = 250
          Height = 207
          Align = alRight
          TabOrder = 3
          object dbmCONFLICT_TEXT: TcxDBMemo
            Left = 1
            Top = 1
            Align = alTop
            DataBinding.DataField = 'CONFLICT_TEXT'
            DataBinding.DataSource = dsLesson
            ParentFont = False
            Properties.ReadOnly = True
            Properties.ScrollBars = ssVertical
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clWindowText
            Style.Font.Height = -16
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = []
            Style.IsFontAssigned = True
            TabOrder = 0
            Height = 104
            Width = 248
          end
          object dbmCONFLICT_NOTE: TcxDBMemo
            Left = 1
            Top = 113
            Align = alClient
            DataBinding.DataField = 'CONFLICT_NOTE'
            DataBinding.DataSource = dsLesson
            ParentFont = False
            Properties.ScrollBars = ssVertical
            Style.Font.Charset = DEFAULT_CHARSET
            Style.Font.Color = clWindowText
            Style.Font.Height = -16
            Style.Font.Name = 'Tahoma'
            Style.Font.Style = []
            Style.IsFontAssigned = True
            TabOrder = 1
            Height = 93
            Width = 248
          end
          object cxSplitter6: TcxSplitter
            Left = 1
            Top = 105
            Width = 248
            Height = 8
            HotZoneClassName = 'TcxMediaPlayer9Style'
            AlignSplitter = salTop
            Control = dbmCONFLICT_TEXT
          end
        end
        object cxSplitter3: TcxSplitter
          Left = 435
          Top = 1
          Width = 8
          Height = 207
          HotZoneClassName = 'TcxMediaPlayer9Style'
          AlignSplitter = salRight
          Control = pnConflict
        end
      end
      object cxSplitter5: TcxSplitter
        Left = 1
        Top = 317
        Width = 694
        Height = 8
        HotZoneClassName = 'TcxMediaPlayer9Style'
        AlignSplitter = salBottom
        Control = Panel5
      end
      object Panel6: TPanel
        Left = 1
        Top = 1
        Width = 694
        Height = 72
        Align = alTop
        TabOrder = 3
        DesignSize = (
          694
          72)
        object rbOtmech: TcxRadioButton
          Left = 8
          Top = 8
          Width = 121
          Height = 17
          Caption = #1054#1090#1084#1077#1095#1077#1085#1099' '#1082' '#1086#1087#1083#1072#1090#1077
          TabOrder = 0
          OnClick = rbOtmechClick
        end
        object rbNeotm: TcxRadioButton
          Left = 136
          Top = 8
          Width = 113
          Height = 17
          Caption = #1053#1077' '#1086#1090#1084#1077#1095#1077#1085#1099
          Checked = True
          TabOrder = 1
          TabStop = True
          OnClick = rbOtmechClick
        end
        object rbAll: TcxRadioButton
          Left = 232
          Top = 8
          Width = 49
          Height = 17
          Caption = #1042#1089#1077
          TabOrder = 2
          OnClick = rbOtmechClick
        end
        object cxButton2: TcxButton
          Left = 588
          Top = 6
          Width = 105
          Height = 25
          Anchors = [akTop, akRight]
          Caption = #1057#1085#1103#1090#1100' '#1074#1099#1076#1077#1083#1077#1085#1080#1077
          TabOrder = 3
          Visible = False
          OnClick = cxButton2Click
        end
        object cxLabel2: TcxLabel
          Left = 12
          Top = 45
          Caption = #1055#1077#1088#1080#1086#1076' '#1076#1083#1103' '#1076#1086#1087'. '#1091#1089#1083#1091#1075
        end
        object eDateAS: TcxButtonEdit
          Tag = 11
          Left = 140
          Top = 42
          ParentFont = False
          Properties.Buttons = <
            item
              Glyph.Data = {
                F6000000424DF600000000000000760000002800000010000000100000000100
                0400000000008000000000000000000000001000000000000000000000000000
                8000008000000080800080000000800080008080000080808000C0C0C0000000
                FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFF0FFFFFFFFFFFFFF000FFFFFFFFFFFF00000FFFFFFFFFF0000000F
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
            end>
          Properties.MaxLength = 0
          Properties.ReadOnly = True
          Properties.OnButtonClick = eDateASPropertiesButtonClick
          Properties.OnChange = eDateASPropertiesChange
          Style.Font.Charset = DEFAULT_CHARSET
          Style.Font.Color = clWindowText
          Style.Font.Height = -13
          Style.Font.Name = 'Tahoma'
          Style.Font.Style = [fsBold]
          Style.LookAndFeel.SkinName = ''
          Style.Shadow = False
          Style.IsFontAssigned = True
          StyleDisabled.LookAndFeel.SkinName = ''
          StyleFocused.LookAndFeel.SkinName = ''
          StyleHot.LookAndFeel.SkinName = ''
          TabOrder = 5
          Width = 397
        end
        object btnCheckAllNotConflict: TcxButton
          Left = 289
          Top = 6
          Width = 163
          Height = 25
          Anchors = [akTop, akRight]
          Caption = #1042#1099#1073#1088#1072#1090#1100' '#1074#1089#1077' '#1073#1077#1089#1082#1086#1085#1092#1083#1080#1082#1090#1085#1099#1077
          TabOrder = 6
          Visible = False
          OnClick = btnCheckAllNotConflictClick
        end
      end
    end
    object cxButton1: TcxButton
      Left = 1198
      Top = 8
      Width = 106
      Height = 25
      Anchors = [akTop, akRight]
      Caption = #1042#1099#1073#1088#1072#1090#1100' '#1074#1089#1077
      TabOrder = 3
      Visible = False
      OnClick = cxButton1Click
    end
  end
  inherited dlgDS: TDataSource
    DataSet = qPedag
    Left = 64
    Top = 88
  end
  object qPedag: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterOpen = qPedagAfterOpen
    CachedUpdates = True
    SQL.Strings = (
      
        'SELECT DISTINCT RS.PID_PEDAG, sp.KOL_K_OPLATE koplate, sp.KOL_UJ' +
        'E_VYPL AS oplacheno_,'
      
        '(p.plastname || '#39' '#39' || SUBSTRING(p.pname FROM 1 FOR 1) || '#39'. '#39' |' +
        '| COALESCE(SUBSTRING(p.ppatronymic FROM 1 FOR 1) || '#39'.'#39', '#39' '#39')) A' +
        'S pp,'
      
        'CAST(NULL as INTEGER) AS oplacheno, sp.amount_vyplatit, sp.amoun' +
        't_uje_vyplatili,'
      
        'sp1.amount_vyplatit AS vyplatit_period, sp1.amount_uje_vyplatili' +
        ' AS uje_vypl_period'
      'FROM RENDERING_SERVICES RS'
      'INNER JOIN PEOPLE P ON P.PID = RS.PID_PEDAG'
      'INNER JOIN'
      '('
      
        'SELECT PID, amount_vyplatit, amount_uje_vyplatili, KOL_K_OPLATE,' +
        ' KOL_UJE_VYPL'
      'FROM SP_DOP_USL(CURRENT_DATE - 3650, CURRENT_DATE)'
      ') AS sp ON sp.pid = p.PID'
      'INNER JOIN'
      '('
      'SELECT PID, amount_vyplatit, amount_uje_vyplatili'
      'FROM SP_DOP_USL(:date_begin, :date_end)'
      ') AS sp1 ON sp1.pid = p.PID'
      'WHERE (coalesce(RS.RSISDELETE, 0) = 0)'
      'AND P.PISDELETE IS NULL')
    UpdateObject = quPedag
    Left = 104
    Top = 88
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'date_begin'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_end'
        ParamType = ptUnknown
      end>
    object qPedagPID_PEDAG: TIntegerField
      FieldName = 'PID_PEDAG'
      Origin = '"RENDERING_SERVICES"."PID_PEDAG"'
    end
    object qPedagPP: TIBStringField
      FieldName = 'PP'
      ProviderFlags = []
      Size = 769
    end
    object qPedagKOPLATE: TIntegerField
      FieldName = 'KOPLATE'
      ProviderFlags = []
    end
    object qPedagOPLACHENO_: TIntegerField
      FieldName = 'OPLACHENO_'
      ProviderFlags = []
    end
    object qPedagOPLACHENO: TIntegerField
      FieldName = 'OPLACHENO'
      ProviderFlags = []
      DisplayFormat = '#,###0'
    end
    object qPedagAMOUNT_VYPLATIT: TIBBCDField
      FieldName = 'AMOUNT_VYPLATIT'
      Origin = '"SP_DOP_USL"."AMOUNT_VYPLATIT"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qPedagAMOUNT_UJE_VYPLATILI: TIBBCDField
      FieldName = 'AMOUNT_UJE_VYPLATILI'
      Origin = '"SP_DOP_USL"."AMOUNT_UJE_VYPLATILI"'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qPedagVYPLATIT_PERIOD: TIBBCDField
      FieldName = 'VYPLATIT_PERIOD'
      ProviderFlags = []
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
    object qPedagUJE_VYPL_PERIOD: TIBBCDField
      FieldName = 'UJE_VYPL_PERIOD'
      ProviderFlags = []
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
  end
  object dsLesson: TDataSource
    DataSet = qLesson
    OnDataChange = dsLessonDataChange
    Left = 360
    Top = 112
  end
  object qLesson: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    DataSource = dlgDS
    SQL.Strings = (
      'select distinct RS.PID_PEDAG, SD.SDNAME, RS.RSDATE,'
      
        '(P.PLASTNAME || '#39' '#39' || substring(P.PNAME from 1 for 1) || '#39'. '#39' |' +
        '| coalesce(substring(P.PPATRONYMIC from 1 for 1) || '#39'.'#39', '#39' '#39')) a' +
        's PP,'
      
        'RSP.RSOPLATIT, RSP.RSOPLACHENO, RSP.PID, RSP.RSID,('#39#1058#1077#1084#1072': '#39'||RS.' +
        'RSTEMA) as RSTEMA,'
      '('#39#1053#1072#1073#1083#1102#1076#1077#1085#1080#1077': '#39'||RSP.RSPNOTE) as RSNABLJUD,'
      'RSP.RSPTIMEENTER, RS.RSTIMEBEGIN,'
      'RS.RSTIMEEND, SD1.SDNAME as OSN_PODR, RSP.PID, RS.RSID,'
      'RSP.IS_TIME_CONFLICT,'
      'iif((RSP.IS_TIME_CONFLICT > 0), 1, 0) as IS_EXIST_TIME_CONFLICT,'
      '('#39#1054#1073#1098#1103#1089#1085#1077#1085#1080#1077' '#1087#1077#1076#1072#1075#1086#1075#1072': '#39' || RSP.CONFLICT_NOTE) as CONFLICT_NOTE,'
      '('#39#1055#1088#1080#1095#1080#1085#1072' '#1082#1086#1085#1092#1083#1080#1082#1090#1072': '#39' || TC.CONFLICT_TEXT) as CONFLICT_TEXT,'
      'RSP.CHIEF_NOTE,'
      'DUT.TTARIF'
      'from RENDERING_SERVICES RS'
      'inner join SYS_DIC SD on (SD.SDID = RS.SDID)'
      'inner join RS_PEOPLE RSP on (RSP.RSID = RS.RSID)'
      'inner join PEOPLE P on (P.PID = RSP.PID)'
      
        'left outer join deti_podrazd DP on ((DP.PID = RSP.PID) and (RS.R' +
        'SDATE between cast(DP.DPDATEIN as date) and coalesce(cast(DP.DPD' +
        'ATEOUT as date), current_date)))'
      'left outer join SYS_DIC SD1 on (SD1.SDID = DP.SDID)'
      
        'left join P_GET_TEXT_CONFLICT(RSP.IS_TIME_CONFLICT) TC on (1 = 1' +
        ')'
      
        'left join DOP_USL_TARIFFS DUT on ((DUT.PID = :PID_PEDAG) and (DU' +
        'T.SDID = SD.SDID))'
      'where ((RS.PID_PEDAG = :PID_PEDAG) and'
      '       (coalesce(RS.RSISDELETE, 0) = 0) and'
      '       (coalesce(RSP.RSPISDELETE, 0) = 0) and'
      '       (RS.RSDATE between :DATE_BEGIN and :DATE_END))')
    UpdateObject = quLesson
    Left = 400
    Top = 120
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID_PEDAG'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'PID_PEDAG'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_begin'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_end'
        ParamType = ptUnknown
      end>
    object qLessonPID_PEDAG: TIntegerField
      FieldName = 'PID_PEDAG'
      Origin = '"RENDERING_SERVICES"."PID_PEDAG"'
    end
    object qLessonSDNAME: TIBStringField
      FieldName = 'SDNAME'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qLessonRSDATE: TDateField
      FieldName = 'RSDATE'
      Origin = '"RENDERING_SERVICES"."RSDATE"'
    end
    object qLessonPP: TIBStringField
      FieldName = 'PP'
      ProviderFlags = []
      Size = 769
    end
    object qLessonRSOPLATIT: TIntegerField
      FieldName = 'RSOPLATIT'
      Origin = '"RS_PEOPLE"."RSOPLATIT"'
    end
    object qLessonRSOPLACHENO: TIntegerField
      FieldName = 'RSOPLACHENO'
      Origin = '"RS_PEOPLE"."RSOPLACHENO"'
    end
    object qLessonPID: TIntegerField
      FieldName = 'PID'
      Origin = '"RS_PEOPLE"."PID"'
    end
    object qLessonRSID: TIntegerField
      FieldName = 'RSID'
      Origin = '"RS_PEOPLE"."RSID"'
      Required = True
    end
    object qLessonRSTEMA: TIBStringField
      FieldName = 'RSTEMA'
      Origin = '"RENDERING_SERVICES"."RSTEMA"'
      Size = 2048
    end
    object qLessonRSNABLJUD: TIBStringField
      FieldName = 'RSNABLJUD'
      Origin = '"RENDERING_SERVICES"."RSNABLJUD"'
      Size = 2048
    end
    object qLessonRSPTIMEENTER: TDateTimeField
      FieldName = 'RSPTIMEENTER'
      Origin = '"RS_PEOPLE"."RSPTIMEENTER"'
    end
    object qLessonRSTIMEBEGIN: TTimeField
      FieldName = 'RSTIMEBEGIN'
      Origin = '"RENDERING_SERVICES"."RSTIMEBEGIN"'
    end
    object qLessonRSTIMEEND: TTimeField
      FieldName = 'RSTIMEEND'
      Origin = '"RENDERING_SERVICES"."RSTIMEEND"'
    end
    object qLessonOSN_PODR: TIBStringField
      FieldName = 'OSN_PODR'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
    object qLessonIS_TIME_CONFLICT: TIntegerField
      FieldName = 'IS_TIME_CONFLICT'
    end
    object qLessonIS_EXIST_TIME_CONFLICT: TSmallintField
      FieldName = 'IS_EXIST_TIME_CONFLICT'
    end
    object qLessonCONFLICT_TEXT: TStringField
      FieldName = 'CONFLICT_TEXT'
      Size = 2048
    end
    object qLessonCONFLICT_NOTE: TStringField
      FieldName = 'CONFLICT_NOTE'
      Size = 2048
    end
    object qLessonCHIEF_NOTE: TStringField
      FieldName = 'CHIEF_NOTE'
      Size = 2048
    end
    object qLessonTTARIF: TIBBCDField
      FieldName = 'TTARIF'
      DisplayFormat = '#,###0'
      Precision = 18
      Size = 2
    end
  end
  object quLesson: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  RSID,'
      '  PID,'
      '  RSPLEVEL,'
      '  RSPUSERENTER,'
      '  RSPTIMEENTER,'
      '  RSPUSEREDIT,'
      '  RSPTIMEEDIT,'
      '  RSPNOTE,'
      '  RSPISDELETE,'
      '  RSOPLATIT,'
      '  RSOPLACHENO'
      'from RS_PEOPLE '
      'where'
      '  PID = :PID and'
      '  RSID = :RSID')
    ModifySQL.Strings = (
      'update RS_PEOPLE RSP'
      'set RSP.RSOPLATIT = :RSOPLATIT,'
      '    RSP.CHIEF_NOTE = :CHIEF_NOTE'
      'where'
      '  RSP.PID = :OLD_PID and'
      '  RSP.RSID = :OLD_RSID')
    InsertSQL.Strings = (
      'null;')
    DeleteSQL.Strings = (
      'null;')
    Left = 440
    Top = 120
  end
  object quPedag: TIBUpdateSQL
    ModifySQL.Strings = (
      'update RS_PEOPLE'
      'set'
      '  oplacheno = :oplacheno'
      'where'
      '  PID = :OLD_PID and'
      '  RSID = :OLD_RSID')
    Left = 144
    Top = 88
  end
  object sqlUpdateRS_People: TIBSQL
    Database = DMInv.DBRead
    SQL.Strings = (
      'UPDATE rs_people rsp'
      'SET rsp.rsoplacheno = 1'
      'WHERE rsp.rsoplatit = 1 AND'
      '      (coalesce(rsp.rsoplacheno, 0) = 0) AND'
      '      rsp.rsid IN (SELECT rs.rsid'
      '                   FROM rendering_services rs'
      '                   WHERE rs.pid_pedag = :pid_pedag AND'
      '                         (coalesce(rs.rsisdelete, 0) = 0)) AND'
      '      (coalesce(rsp.rspisdelete, 0) = 0) AND'
      '      EXISTS(SELECT t.tid'
      '             FROM rendering_services rs'
      
        '             INNER JOIN dop_usl_tariffs t ON rs.pid_pedag = t.pi' +
        'd AND (rs.rsdate BETWEEN t.tdatebegin AND COALESCE(t.tdateend, C' +
        'URRENT_DATE))'
      
        '             WHERE rs.rsid = rsp.rsid AND rs.pid_pedag = :pid_pe' +
        'dag AND'
      '                   (coalesce(rs.rsisdelete, 0) = 0))')
    Transaction = DMInv.IBTransaction1
    Left = 64
    Top = 120
  end
  object SD1: TSaveDialog
    InitialDir = 'c:\'
    Options = [ofOverwritePrompt, ofHideReadOnly, ofEnableSizing]
    Left = 168
    Top = 120
  end
  object qLesTemp: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'select distinct RS.PID_PEDAG, SD.SDNAME, RS.RSDATE,'
      
        '(P.PLASTNAME || '#39' '#39' || substring(P.PNAME from 1 for 1) || '#39'. '#39' |' +
        '| coalesce(substring(P.PPATRONYMIC from 1 for 1) || '#39'.'#39', '#39' '#39')) a' +
        's PP,'
      
        'RSP.RSOPLATIT, RSP.RSOPLACHENO, RSP.PID, RSP.RSID,('#39#1058#1077#1084#1072': '#39'||RS.' +
        'RSTEMA) as RSTEMA,'
      '('#39#1053#1072#1073#1083#1102#1076#1077#1085#1080#1077': '#39'||RSP.RSPNOTE) as RSNABLJUD,'
      'RSP.RSPTIMEENTER, RS.RSTIMEBEGIN,'
      'RS.RSTIMEEND, SD1.SDNAME AS OSN_PODR, RSP.PID, RS.RSID,'
      'RSP.IS_TIME_CONFLICT,'
      'iif((RSP.IS_TIME_CONFLICT > 0), 1, 0) as IS_EXIST_TIME_CONFLICT,'
      '('#39#1054#1073#1098#1103#1089#1085#1077#1085#1080#1077' '#1087#1077#1076#1072#1075#1086#1075#1072': '#39' || RSP.CONFLICT_NOTE) as CONFLICT_NOTE,'
      '('#39#1055#1088#1080#1095#1080#1085#1072' '#1082#1086#1085#1092#1083#1080#1082#1090#1072': '#39' || TC.CONFLICT_TEXT) as CONFLICT_TEXT,'
      'RSP.CHIEF_NOTE,'
      'DUT.TTARIF'
      'from RENDERING_SERVICES RS'
      'inner join SYS_DIC SD on (SD.SDID = RS.SDID)'
      'inner join RS_PEOPLE RSP on (RSP.RSID = RS.RSID)'
      'inner join PEOPLE P on (P.PID = RSP.PID)'
      
        'left outer join deti_podrazd DP on ((DP.PID = RSP.PID) and (RS.R' +
        'SDATE between cast(DP.DPDATEIN as date) and coalesce(cast(DP.DPD' +
        'ATEOUT as date), current_date)))'
      'left outer join SYS_DIC SD1 on (SD1.SDID = DP.SDID)'
      
        'left join P_GET_TEXT_CONFLICT(RSP.IS_TIME_CONFLICT) TC on (1 = 1' +
        ')'
      
        'left join DOP_USL_TARIFFS DUT on ((DUT.PID = :PID_PEDAG) and (DU' +
        'T.SDID = SD.SDID))'
      'where ((RS.PID_PEDAG = :PID_PEDAG) and'
      '       (coalesce(RS.RSISDELETE, 0) = 0) and'
      '       (coalesce(RSP.RSPISDELETE, 0) = 0) and'
      '       (RS.RSDATE between :DATE_BEGIN and :DATE_END))')
    Left = 400
    Top = 160
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PID_PEDAG'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'PID_PEDAG'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_begin'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_end'
        ParamType = ptUnknown
      end>
  end
  object qpedtemp: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterOpen = qPedagAfterOpen
    SQL.Strings = (
      
        'SELECT DISTINCT RS.PID_PEDAG, sp.KOL_K_OPLATE koplate, sp.KOL_UJ' +
        'E_VYPL AS oplacheno_,'
      
        '(p.plastname || '#39' '#39' || SUBSTRING(p.pname FROM 1 FOR 1) || '#39'. '#39' |' +
        '| COALESCE(SUBSTRING(p.ppatronymic FROM 1 FOR 1) || '#39'.'#39', '#39' '#39')) A' +
        'S pp,'
      
        'CAST(NULL as INTEGER) AS oplacheno, sp.amount_vyplatit, sp.amoun' +
        't_uje_vyplatili,'
      
        'sp1.amount_vyplatit AS vyplatit_period, sp1.amount_uje_vyplatili' +
        ' AS uje_vypl_period'
      'FROM RENDERING_SERVICES RS'
      'INNER JOIN PEOPLE P ON P.PID = RS.PID_PEDAG'
      'INNER JOIN'
      '('
      
        'SELECT PID, amount_vyplatit, amount_uje_vyplatili, KOL_K_OPLATE,' +
        ' KOL_UJE_VYPL'
      'FROM SP_DOP_USL(CURRENT_DATE - 3650, CURRENT_DATE)'
      ') AS sp ON sp.pid = p.PID'
      'INNER JOIN'
      '('
      'SELECT PID, amount_vyplatit, amount_uje_vyplatili'
      'FROM SP_DOP_USL(:date_begin, :date_end)'
      ') AS sp1 ON sp1.pid = p.PID'
      'WHERE (coalesce(RS.RSISDELETE, 0) = 0)'
      'AND P.PISDELETE IS NULL')
    Left = 104
    Top = 128
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'date_begin'
        ParamType = ptUnknown
      end
      item
        DataType = ftUnknown
        Name = 'date_end'
        ParamType = ptUnknown
      end>
  end
end
